#include"logger.hpp"
#include<gflags/gflags.h>

DEFINE_bool(run_mode, false, "程序的运行模式, fasle-调试; true-发布;");
DEFINE_string(log_file, "", "发布模式下, 用于指定日志的输出文件");
DEFINE_int32(log_level, 0, "发布模式下, 用于指定日志输出等级");  //trace default 0


int main(int argc, char *argv[])
{
    
    google::ParseCommandLineFlags(&argc, &argv, true);
    
    init_logger(FLAGS_run_mode, FLAGS_log_file, FLAGS_log_level);

    std::cout << FLAGS_run_mode << std::endl;
    std::cout << FLAGS_log_file << std::endl;
    std::cout << FLAGS_log_level << std::endl;
   
    LOG_DEBUG("你好: {}", "1");
    LOG_WARN("你好: {}", "3");
    LOG_TRACE("你好: {}", "0");
    LOG_ERROR("你好: {}", "4");
    LOG_INFO("你好: {}", "2");
    LOG_FATAL("你好: {}", "5");
    
    return 0;

}